/**
 * Created by charsen on 16/6/7.
 */
directives.directive('feedBack', ["$rootScope", "tools", "$timeout", function ($rootScope, tools, $timeout) {
    return {
        restrict: 'AE',
        scope: {},
        replace: true,
        link: function (scope, element, attr) {
            var $ele = $(element);

            // 图全屏
            $rootScope.$on('FEED_BACK_EV', function (e) {
                $ele.modal('show');
                $ele.find('textarea').width($ele.find('.content').width() - 35);
            });

            scope.content = "";
            scope.close = function () {
                $ele.modal('hide');
            }

            scope.commit = function () {

            }
        },
        templateUrl: "/trend-new-BI/app/components/common/feedBack/feedBackView.html"
    }
}]);